From 6ef5bd54d5cdea80adc6972dbcb662908b3e39dd Mon Sep 17 00:00:00 2001 From: real-zephex Date: Sun, 19 May 2024 08:00:13 +0530 Subject: added series support --- src/app/web-series/[id]/page.jsx | 111 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 src/app/web-series/[id]/page.jsx (limited to 'src/app/web-series/[id]') diff --git a/src/app/web-series/[id]/page.jsx b/src/app/web-series/[id]/page.jsx new file mode 100644 index 0000000..63fcc3a --- /dev/null +++ b/src/app/web-series/[id]/page.jsx @@ -0,0 +1,111 @@ +import Image from "next/image"; +import { SERIES_INFO, CREW_DETAILS } from "../components/data-fetch"; +import styles from "../styles/info.module.css"; +import { BiSolidUpvote } from "react-icons/bi"; +import { LiaStarSolid } from "react-icons/lia"; +import SeriesPlayer from "../components/videoPlayer"; + +const SeriesInfoPage = async ({ params }) => { + const id = params.id; + const data = await FetchSeriesInfo(id); + const crew_data = await CREW_DETAILS(id); + return ( +
+
+
+
+ Series Poster +
+

{data.name}

+

+ {data.original_name} +

+

+ {data.tagline || "not found"} +

+

+ {" "} + {data.overview} +

+
+

+ Genres:{" "} + {data.genres.map((item, index) => ( + + {item.name} + {index !== data.genres.length - 1 && + ", "} + + ))} +

+

+ Seasons: {data.number_of_seasons} +

+

+ Episodes: {data.number_of_episodes} +

+
+
+ {" "} +

{data.vote_count}

+
+
+ {" "} +

{data.vote_average}

+
+
+
+
+
+

Crew

+
+ {crew_data && + crew_data.cast.map((item, index) => ( +
+ Crew Poster +

{item.name}

+

+ {item.character} +

+
+ ))} +
+
+ +
+ +
+
+
+
+ ); +}; + +const FetchSeriesInfo = async (id) => { + const data = SERIES_INFO(id); + return data; +}; + +export default SeriesInfoPage; -- cgit v1.2.3